#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <JXQCore/JMeta>
#include <JXQCore/JThreadPool>
#include <JXQCore/JTimer>
#include <QTimer>

namespace Ui {
class MainWidget;
}

class MainWidget : public QWidget
{
	Q_OBJECT

public:
	MainWidget(QWidget *parent = nullptr);
	~MainWidget();

private slots:
	void on_pb_concurrent_clicked();
	void on_pb_concurrent_2_clicked();
	void on_pb_threadPool_clicked();
	void on_pb_threadPoolInfo_clicked();
	void on_pb_threadPoolSet_clicked();
	void on_pb_threadPoolWait_clicked();

private:
	void concurrent();
	void concurrent2(int v);

#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
private slots:
	void timeout();
#endif

private:
	Ui::MainWidget *ui;
	JXQ::JThreadPool pool;
	JXQ::JTimer jtimer[3];
};


#endif // MAINWIDGET_H
